export default {
  cartItems: state => state.cartItems,
  
  totalPrice: (state) => {
    return state.cartItems.reduce((total, item) => {
      return total + (item.price * item.quantity)
    }, 0)
  }
}